@extends('akl.Admin.Base-index')
@section('content')
<script>
	$('#left-bar .nav>li:nth-child(3)>.menu').addClass('on');
</script>
<div class="main-menu fadeInLeft">
	<div class="title">
		<i class="fa fa-file-text-o"></i> 添加角色
	</div>
	<ul class="act-list">
		<li>
			<a href="/Admin/Role/index"><i class="fa fa-plus-square-o"></i>角色列表</a>
		</li>
	</ul>
</div>
<div class="main-wrap fadeInRight">
	@if (count($errors) > 0)
		<div style="color: red">
			<ul>
				@if( is_object($errors) )
					@foreach ($errors->all() as $error)
						<li>{{ $error }}</li>
					@endforeach
				@else
					{{ $errors }}
				@endif
			</ul>
		</div>
	@endif
	<form class="formPanel" action="" method="post">
		{{csrf_field()}}
		<div class="form-group">
			<label>角色名：</label><input type="text" name="name"/>
		</div>
		<div class="form-group">
			<label>角色描述：</label><input type="text" name="description"/>
		</div>
		<div class="form-group" id="role_permi">
			@foreach( $permission as $sort)
				<label><input type="checkbox" name="permission_ids[]" value={{$sort->id}} />{{$sort->ids}} {{$sort->display_name}}</label>
			@endforeach
		</div>
		<input class="save-btn" type="submit" name="send" value="添加角色" />
	</form>
</div>

@endsection